<html>
<head><meta charset="utf-8"><title>const generics and variance · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html">const generics and variance</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="163583339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583339">(Apr 17 2019 at 17:37)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> <span class="user-mention" data-user-id="218608">@yodal</span>  What is your notion of "must use" wrt. const parameters?  e.g. is <code>struct A&lt;const N: usize&gt;;</code> valid despite <code>N</code> being unused?</p>



<a name="163583362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583362">(Apr 17 2019 at 17:37)</a>:</h4>
<p>(given that there's no variance to speak of...)</p>



<a name="163583376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583376">(Apr 17 2019 at 17:37)</a>:</h4>
<p>right now, no, but I saw <span class="user-mention" data-user-id="203289">@boats</span>'s comment about it</p>



<a name="163583390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583390">(Apr 17 2019 at 17:37)</a>:</h4>
<p>that can be fixed in a separate PR</p>



<a name="163583403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583403">(Apr 17 2019 at 17:37)</a>:</h4>
<p>(that is, it's not related to <code>infer</code>)</p>



<a name="163583458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583458">(Apr 17 2019 at 17:38)</a>:</h4>
<p>exactly what <span class="user-mention" data-user-id="121053">@varkor</span> said</p>



<a name="163583514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583514">(Apr 17 2019 at 17:38)</a>:</h4>
<p>I was planning on throwing together a small PR, but I had been pulled into work and linker madness lately and it isn't a pressing issue</p>



<a name="163583535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583535">(Apr 17 2019 at 17:39)</a>:</h4>
<p>ugh... how do you move this to a separate topic?</p>



<a name="163583589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583589">(Apr 17 2019 at 17:39)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> do you have the link to that comment?</p>



<a name="163583609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583609">(Apr 17 2019 at 17:39)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> <a href="https://github.com/rust-lang/rust/issues/44580#issuecomment-482797427" target="_blank" title="https://github.com/rust-lang/rust/issues/44580#issuecomment-482797427">https://github.com/rust-lang/rust/issues/44580#issuecomment-482797427</a></p>



<a name="163583710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583710">(Apr 17 2019 at 17:40)</a>:</h4>
<p>I've made <a href="https://github.com/rust-lang/rust/issues/60047" target="_blank" title="https://github.com/rust-lang/rust/issues/60047">https://github.com/rust-lang/rust/issues/60047</a></p>



<a name="163583746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583746">(Apr 17 2019 at 17:41)</a>:</h4>
<p>I feel it's reasonable to open up issues about const generics features that <em>are</em> already implemented, at least just for ourselves</p>



<a name="163583843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583843">(Apr 17 2019 at 17:42)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> definitely do so; it is helpful for T-Lang as well to review the history</p>



<a name="163583876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163583876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163583876">(Apr 17 2019 at 17:42)</a>:</h4>
<p><span class="user-mention" data-user-id="218608">@yodal</span>  thanks; I agree <span class="user-mention" data-user-id="203289">@boats</span>'s note makes sense (and I agree about type parameters as well, but that's a separate issue)</p>



<a name="163584077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163584077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163584077">(Apr 17 2019 at 17:44)</a>:</h4>
<p>(I can't remember how to move existing conversations to new threads on Zulip)</p>



<a name="163584095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163584095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163584095">(Apr 17 2019 at 17:45)</a>:</h4>
<p>but I can fix that issue once I've added some tests</p>



<a name="163584155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/const%20generics%20and%20variance/near/163584155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/const.20generics.20and.20variance.html#163584155">(Apr 17 2019 at 17:45)</a>:</h4>
<p>Just want to say a big "thank you" for all your great work on const generics. Really eager to see all this moving towards the finishing line (and eventually landing it on stable)  :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>